package com.zhangshitong.springbootModel.utils;

public class ClientContextHolder {

	private static ClientContextHolder holder = new ClientContextHolder();

	  private static ThreadLocal<ClientContext> clientContext = new ThreadLocal();

	  public static ClientContextHolder getInstance()
	  {
	    return holder;
	  }

	  public ClientContext getClientContext() {
	    if (clientContext.get() == null) {
	      return null;
	    }
	    return (ClientContext)clientContext.get();
	  }

	  public void setClientContext(ClientContext p_clientContext) {
	    clientContext.set(p_clientContext);
	  }
}
